
// PatchGeneratorView.h : interface of the CPatchGeneratorView class
//


#pragma once

#include "OpenGLView.h"


class CPatchGeneratorView : public COpenGLView
{
protected: // create from serialization only
	CPatchGeneratorView();
	DECLARE_DYNCREATE(CPatchGeneratorView)

// Attributes
public:
	CPatchGeneratorDoc* GetDocument() const;

// Operations
public:

// Overrides
public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);

// Implementation
public:
	virtual ~CPatchGeneratorView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:
  virtual bool InitializeOpenGL();
  virtual void PreRenderScene();
  virtual void RenderScene();


  virtual void GLSelectModeDraw();
  virtual void selectMeshPrimitive(const SelectedPrimitiveInfo &info);
  virtual void clearSelectedMeshPrimitives();


// Generated message map functions
protected:
	afx_msg void OnFilePrintPreview();
	afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
};

#ifndef _DEBUG  // debug version in PatchGeneratorView.cpp
inline CPatchGeneratorDoc* CPatchGeneratorView::GetDocument() const
   { return reinterpret_cast<CPatchGeneratorDoc*>(m_pDocument); }
#endif

